<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
</head>
<body>
<div id="app">
   price: <input v-model="price" type="number">
   count: <input v-model="count" type="number">
    ￥{{total}}
    <hr>
    出场费: <input v-model="girl.salary" type="number"> ￥{{girl.total}}
    test Total: {{hitotal}}
</div>
<script src="js/vue.js"></script>
<script>
    vm=new Vue({
        el:'#app',
        data:{
            price:0,
            total:0,
            count:0,
            girl:{
                salary:0,
                total:0
            }
        },
        watch:{
            count(val){
                this.total=this.price*val

            },
            mysalary(val) {
                  this.girl.total=val*this.count
            }
        },
        computed:{
            mysalary() {
                return this.girl.salary
            },
            hitotal() {
                return this.girl.salary*this.count
            }
        }
    })
</script>
</body>
</html>